package cn.mafangui.hotel.controller.common;

import cn.mafangui.hotel.response.AjaxResult;
import cn.mafangui.hotel.response.ResponseTool;
import cn.mafangui.hotel.service.HotelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "酒店", tags = "全局")
@RestController
@RequestMapping(value = "/hotel")
public class HotelController {
    @Autowired
    private HotelService hotelService;

    @ApiOperation(value = "得到所有酒店", notes = "首页使用")
    @GetMapping("")
    public AjaxResult getAllHotel() {
        return ResponseTool.success(hotelService.selectAll());
    }
}
